<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>机会列表</title>
<link rel="stylesheet" href="themes/default/easyui.css" />
<link rel="stylesheet" href="themes/icon.css" />
<script src="js/jquery.min.js"></script>
<script src="js/jquery.easyui.min.js"></script>
<script src="js/locale/easyui-lang-zh_CN.js"></script>
<style type="text/css">
	

</style>
</head>
<body>
<script type="text/javascript">
$(function (){  
    $('#tt').datagrid({  
        url: '/crm/opp',  
        title: '销售机会',  
        height: 500,  
        fitColumns: true,  
        pagination: true,//分页显示  
        rownumbers: true,  
        onClickCell: onClickCell,//点击单元格触发事件  
        columns: [[  
            { field: 'AdvertisementID', title: '选择', width: 90, align: 'center' ,
            	 formatter: function(value, rowData, rowIndex){
                     return '<input type="radio" name="selectRadio" id="selectRadio"' + rowIndex + 'value="' + rowData.ID + '" />';
                 }
             },

         
             { field: 'AdvertisementID2', title: 'ID', width: 111, align: 'center' },  
            
            { field: 'AdvertisementName', title: '机会主题', width: 111, align: 'center' },  
            { field: 'AdvertisementUrl', title: '客户', width: 160, align: 'center' },  
            { field: 'UserID1', title: '负责人', width: 80, align: 'center' },  
            { field: 'UserID2', title: '预计签单日期', width: 80, align: 'center' },
            { field: 'UserID3', title: '阶段', width: 80, align: 'center' },
            { field: 'UserID4', title: '可能性', width: 80, align: 'center' },
            { field: 'UserID5', title: '预期签约金额', width: 80, align: 'center' },
            { field: 'UserID6', title: '状态', width: 80, align: 'center' },
            { field: 'UserID7', title: '更新时间', width: 80, align: 'center' },
            { field: 'UserID8', title: '销售优先级', width: 80, align: 'center' },
         

          
        ]],  
        
        
        onHeaderContextMenu: function (e, field) {  
            e.preventDefault();  
            if (!$('#tmenu').length) {  
                createColumnMenu();  
            }  
            $('#tmenu').menu('show', {  
                left: e.pageX,  
                top: e.pageY  
            });  
        }  
    });  
});  
  
  
var id = undefined;//公共变量  
  
//触发单元格事件  
function onClickCell(rowIndex, field, value) {  
    var row = $("#tt").datagrid('selectRow', rowIndex);//返回触发单元格的行标  
    var r1 = $("#tt").datagrid('getSelected');//返回被选中的行  
    id = r1.AdvertisementID;//返回该行的id  
  
}  

</script>
<div>
<div style="height:70px;border:1px solid black;margin-bottom:100px;margin-left:50px">
<select id="cc" class="easyui-combobox" name="dept" style="width:200px;height:50px">
	<option value="aa">状态：跟踪</option>
    <option>状态：成功</option>
    <option>状态：失败</option>
    <option>状态：搁置</option>
    <option>状态：失效</option>
</select>
	
	<input >
</div>





	<table id="tt">
		<tr><td><input type="radio"></td></tr>
	</table>

</div>
	

</body>
</html>